﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using LispInterpretor;
using LispInterpretor.DataTypes;

namespace UnitTests
{
    [TestClass]
    public class TestFirst
    {
        [TestMethod]
        [ExpectedException(typeof(InvalidProgramException))]
        public void TestFirstWithGarbage()
        {
            Evaluator.Eval("(first 3)");
        }

        [TestMethod]
        public void TestFirstWithRealList()
        {
            Assert.AreEqual(new Number(1), Evaluator.Eval("(first (1 2 3))"));
        }
    }
}
